package client_gui;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;

import client_controllers.DefineCategoryController;
import client_controllers.EmployeeLoginController;
import client_controllers.MarketingManagerController;

import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JTextField;

public class DefineCategoryGUI extends JFrame {

	private JPanel contentPane;
	private JTextField textField;
	private JButton btnBack;
	private JComboBox CategoryCombo;
	private JButton btnSubmit;
	private JLabel lblErr;

	/**
	 * Create the frame.
	 * @param elc 
	 * @param mmc 
	 */
	public DefineCategoryGUI(MarketingManagerController mmc, EmployeeLoginController elc) {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setTitle("Define Category");
		setBounds(100, 100, 450, 300);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		btnBack = new JButton("Back");
		btnBack.setBounds(335, 11, 89, 23);
		contentPane.add(btnBack);
		
		CategoryCombo = new JComboBox();
		CategoryCombo.setBounds(84, 67, 165, 20);
		contentPane.add(CategoryCombo);
		
		JLabel lblCategoriesThatAllready = new JLabel("categories that allready exists:");
		lblCategoriesThatAllready.setBounds(84, 41, 210, 14);
		contentPane.add(lblCategoriesThatAllready);
		
		JLabel lblEnterTheName = new JLabel("Enter the name of the new category");
		lblEnterTheName.setBounds(84, 132, 206, 14);
		contentPane.add(lblEnterTheName);
		
		textField = new JTextField();
		textField.setBounds(84, 161, 152, 20);
		contentPane.add(textField);
		textField.setColumns(10);
		
		btnSubmit = new JButton("Submit");
		btnSubmit.setBounds(84, 216, 89, 23);
		contentPane.add(btnSubmit);
		
		lblErr = new JLabel("err");
		lblErr.setBounds(66, 191, 210, 14);
		contentPane.add(lblErr);
		lblErr.setVisible(false);
		
		this.setVisible(true);
		
		DefineCategoryController dcc=new DefineCategoryController(this,mmc,elc);
	}

	public JTextField getTextField() {
		return textField;
	}

	public void setTextField(JTextField textField) {
		this.textField = textField;
	}

	public JButton getBtnBack() {
		return btnBack;
	}

	public void setBtnBack(JButton btnBack) {
		this.btnBack = btnBack;
	}

	public JComboBox getCategoryCombo() {
		return CategoryCombo;
	}

	public void setCategoryCombo(JComboBox categoryCombo) {
		CategoryCombo = categoryCombo;
	}

	public JButton getBtnSubmit() {
		return btnSubmit;
	}

	public void setBtnSubmit(JButton btnSubmit) {
		this.btnSubmit = btnSubmit;
	}

	public JLabel getLblErr() {
		return lblErr;
	}

	public void setLblErr(JLabel lblErr) {
		this.lblErr = lblErr;
	}
	
	
}
